package cn.tedu.boot41.mapper;



import cn.tedu.boot41.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from user where username=#{username}")
    User check(String username);

    @Insert("insert into user values(null,#{username},#{password},#{nick},#{age})")
    void insert(User user);

    @Select("select * from user")
    List<User> select();
}
